export default {
    state:{
        isCollapse: false,
        tabList:[
            {
                path: "/",
                name: "home",
                label: "首页",
                icon: "s-home",
                url: "Home/Home",
            },
        ]

    },
    mutations:{
        collapseMenu(state){
            // console.log('000');
            state.isCollapse = !state.isCollapse
        },
        // 修改更新面包屑数据
        selectMenu(state,value){
            console.log(value);
            if(value.name !== 'home'){
              const index=state.tabList.findIndex(item => item.name===value.name)
            //  不存在时
             if(index === -1){
                state.tabList.push(value)
             }
            }
        }
    }
}